package com.yangzihao.entity;

import java.io.Serializable;
import java.util.Date;

/*新闻表的实体类*/
public class NewsDetail implements Serializable {

    private Integer id; /*新闻编号*/
    private Integer categoryId; /*分类编号*/
    private String title; /*新闻标题*/
    private String summary;/*新闻摘要*/
    private String author;  //作者
    private Date createDate; //创建时间
    private Date updateDate;//更新时间
    private NewsCategory newsCategory;  /*关联的分类*/

    public NewsCategory getNewsCategory() {
        return newsCategory;
    }

    public void setNewsCategory(NewsCategory newsCategory) {
        this.newsCategory = newsCategory;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getCategoryId() {
        return categoryId;
    }

    public void setCategoryId(Integer categoryId) {
        this.categoryId = categoryId;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getSummary() {
        return summary;
    }

    public void setSummary(String summary) {
        this.summary = summary;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public Date getUpdateDate() {
        return updateDate;
    }

    public void setUpdateDate(Date updateDate) {
        this.updateDate = updateDate;
    }

    @Override
    public String toString() {
        return "NewsDetail{" +
                "id=" + id +
                ", categoryId=" + categoryId +
                ", title='" + title + '\'' +
                ", summary='" + summary + '\'' +
                ", author='" + author + '\'' +
                ", createDate=" + createDate +
                ", updateDate=" + updateDate +
                ", newsCategory=" + newsCategory +
                '}';
    }
}
